import numpy as np
import pandas as pd
arr = np.arange(12).reshape(3, 4)
df_obj = pd.DataFrame(arr, index=['row_1', 'row_2', 'row_3'],
                      columns=['col_1', 'col_2', 'col_3', 'col_4'])
# print(df_obj.loc['row_1'])
# print(df_obj.loc[['row_1', 'row_3']]   )
# print(
# df_obj.loc['row_1':'row_2']
# )
# print(df_obj.loc[[True, False, True]])
# print(df_obj.loc['row_3', 'col_3'])
# print(df_obj.loc['row_1':'row_3', ['col_1', 'col_3']] )
# print(df_obj.iloc[0] )
# print(df_obj.iloc[[0, 2]] )
# print(df_obj.iloc[0:2]  )
# print(df_obj.iloc[[True, False, True]]  )
# print(df_obj.iloc[2, 2]   )
print(df_obj.iloc[0:3, [0, 2]])